//Объявление основных стилей
$font-family: "Montserrat", sans-serif;
$dark-purple: #090d28;
$light-purple: #1b1f3e;
$pink: #ea377b;
$color-gray: #aeafb7;
$color-light-gray: #f5f5f5;
$maxWidthContainer: 1360px;
// Announcement of mixin (for similar elements)
@mixin text($font-weight, $font-size, $color, $text-transform: none) {
  font-weight: $font-weight;
  font-size: $font-size;
  color: $color;
  text-transform: $text-transform;
  font-family: $font-family;
}

@mixin size($width, $height) {
  width: $width;
  height: $height;
}

@mixin centering {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
}

@mixin flex-container(
  $display,
  $justify-content: normal,
  $align-items: stretch
) {
  display: $display;
  justify-content: $justify-content;
  align-items: $align-items;
}

@mixin reset-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

// Connecting
@font-face {
  font-family: "Montserrat";
  font-weight: 600;
  src: url("fonts/Montserrat-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-weight: 500;
  src: url("fonts/Montserrat-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-weight: 400;
  src: url("fonts/Montserrat-Regular.woff2") format("woff2");
}

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
     ========================================================================== */

/**
   * Remove the margin in all browsers.
   */

body {
  color: $color-gray;
  margin: 0;
}

/**
   * Render the `main` element consistently in IE.
   */

main {
  display: block;
}

/**
   * Correct the font size and margin on `h1` elements within `section` and
   * `article` contexts in Chrome, Firefox, and Safari.
   */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
     ========================================================================== */

/**
   * 1. Add the correct box sizing in Firefox.
   * 2. Show the overflow in Edge and IE.
   */

hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
   * 1. Correct the inheritance and scaling of font size in all browsers.
   * 2. Correct the odd `em` font sizing in all browsers.
   */

pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
     ========================================================================== */

/**
   * Remove the gray background on active links in IE 10.
   */

a {
  background-color: transparent;
}

/**
   * 1. Remove the bottom border in Chrome 57-
   * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
   */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline dotted; /* 2 */
}

/**
   * Add the correct font weight in Chrome, Edge, and Safari.
   */

b,
strong {
  font-weight: bolder;
}

/**
   * 1. Correct the inheritance and scaling of font size in all browsers.
   * 2. Correct the odd `em` font sizing in all browsers.
   */

code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
   * Add the correct font size in all browsers.
   */

small {
  font-size: 80%;
}

/**
   * Prevent `sub` and `sup` elements from affecting the line height in
   * all browsers.
   */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
     ========================================================================== */

/**
   * Remove the border on images inside links in IE 10.
   */

img {
  border-style: none;
}

/* Forms
     ========================================================================== */

/**
   * 1. Change the font styles in all browsers.
   * 2. Remove the margin in Firefox and Safari.
   */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}

/**
   * Show the overflow in IE.
   * 1. Show the overflow in Edge.
   */

button,
input {
  /* 1 */
  overflow: visible;
}

/**
   * Remove the inheritance of text transform in Edge, Firefox, and IE.
   * 1. Remove the inheritance of text transform in Firefox.
   */

button,
select {
  /* 1 */
  text-transform: none;
}

/**
   * Correct the inability to style clickable types in iOS and Safari.
   */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/**
   * Remove the inner border and padding in Firefox.
   */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
   * Restore the focus styles unset by the previous rule.
   */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
   * Correct the padding in Firefox.
   */

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
   * 1. Correct the text wrapping in Edge and IE.
   * 2. Correct the color inheritance from `fieldset` elements in IE.
   * 3. Remove the padding so developers are not caught out when they zero out
   *    `fieldset` elements in all browsers.
   */

legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}

/**
   * Add the correct vertical alignment in Chrome, Firefox, and Opera.
   */

progress {
  vertical-align: baseline;
}

/**
   * Remove the default vertical scrollbar in IE 10+.
   */

textarea {
  overflow: auto;
}

/**
   * 1. Add the correct box sizing in IE 10.
   * 2. Remove the padding in IE 10.
   */

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
   * Correct the cursor style of increment and decrement buttons in Chrome.
   */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
   * 1. Correct the odd appearance in Chrome and Safari.
   * 2. Correct the outline style in Safari.
   */

[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  appearance: textfield;
  outline-offset: -2px; /* 2 */
}

/**
   * Remove the inner padding in Chrome and Safari on macOS.
   */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
   * 1. Correct the inability to style clickable types in iOS and Safari.
   * 2. Change font properties to `inherit` in Safari.
   */

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
     ========================================================================== */

/*
   * Add the correct display in Edge, IE 10+, and Firefox.
   */

details {
  display: block;
}

/*
   * Add the correct display in all browsers.
   */

summary {
  display: list-item;
}

/* Misc
     ========================================================================== */

/**
   * Add the correct display in IE 10+.
   */

template {
  display: none;
}

/**
   * Add the correct display in IE 10.
   */

[hidden] {
  display: none;
}

// Main styles

.header,
.footer {
  &__container-1 {
    max-width: $maxWidthContainer;
    margin-inline: auto;
  }
}

.product-section,
.trending-section,
.popular-section,
.sport-section,
.facilities-section,
.category-section,
.about-us-section,
.choose-us-section {
  &__container {
    max-width: $maxWidthContainer;
    margin-inline: auto;
  }
}

.about-us-section,
.choose-us-section {
  &__container {
    display: flex;
  }
}

.advantages-section {
  &__condition-container,
  &__container-2 {
    max-width: $maxWidthContainer;
    margin-inline: auto;
  }
}

.header {
  background-color: $dark-purple;
  @include flex-container(flex, space-between, center);
  padding-inline: 40px;

  &__container-1,
  &__container {
    @include flex-container(
                    flex,
            $align-items: center
    ); // we don't need use the justify-content, then ...
  }

  &__burger {
    background-color: $light-purple;
    @include size(22px, 22px);
    border-radius: 50%;
  }

  &__burger-link {
    display: inline-block;
    @include size(100%, 100%);
  }

  &__logo {
    @include size(120px, 80px);
    margin-right: 70px;
  }

  &__ul {
    @include flex-container(flex, $align-items: center);
    @include reset-list();
    text-align: center;
  }

  &__li {
    margin-right: 20px;
  }

  &__li:last-child {
    margin-right: 0;
  }

  &__nav {
    margin-right: 70px;
  }

  &__sign-in,
  &__sign-up,
  &__link,
  &__link--active {
    text-decoration: none;
    color: currentColor;
  }

  &__link,
  &__sign-in,
  &__sign-up,
  &__span,
  &__link--active {
    @include text(500, 1rem, #fff, uppercase);
  }

  &__input {
    background-color: $light-purple;
    border: none;
    border-radius: 10px;
    @include size(305px, 40px);
    font-family: $font-family;
    box-sizing: border-box;
  }

  &__input::placeholder {
    font-size: 1rem;
  }

  &__link--active {
    color: $pink;
  }

  &__icons {
    display: flex;
  }

  &__basket,
  &__favorites {
    cursor: pointer;
    display: block;
    padding: 3px; // расширяем область нажатия
    @include size(24px, 24px); // размеры для svg
    border-radius: 50%;
  }

  &__circle {
    border-radius: 50%;
    background-color: $light-purple;
  }

  &__circle:first-child {
    border: 1px solid #000;
    box-sizing: border-box;
    margin-right: 14px;
  }

  &__search-icon {
    @include size(18px, 18px);
    right: 20px;
    bottom: 10px;
    position: absolute;
    cursor: pointer;
  }

  &__links {
    margin-left: 0;
    margin-right: 14px;
    color: #fff;
  }

  &__input-container {
    position: relative; //для позиционирования иконки поиска
    margin-right: 30px;
  }

  &__link:hover, &__sign-in:hover, &__sign-up:hover {
    color: $color-gray;
    transition: 0.3s;
  }
  &__link--active:hover {
    color: $pink;
  }
}

//Modifiction of input
// input[type=text]::-ms-clear {  display: none; width : 0; height: 0; }
// input[type=text]::-ms-reveal {  display: none; width : 0; height: 0; }
input[type="search"] {
  color: #fff;
  outline: none;
  text-indent: 20px; // отступ первой строки
  font-size: 1rem;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

//First section (advantages, conditions)
.advantages-section {
  background-color: $light-purple;
  padding-top: 90px;
  box-sizing: border-box;
  height: 500px;
  background-image: url("src/images/smoke.png"),
  url("src/images/sport-girl.png");
  background-repeat: no-repeat no-repeat;
  background-size: 1440px 500px, 360px 475px;
  background-position: center, calc(50% + 175px) center; // position in the center of the section as in figma

  &__container {
    @include flex-container(flex, $justify-content: flex-start);
    flex-direction: column;
    margin-left: 232px;
    max-width: 520px;
  }

  &__info {
    @include text(400, 1rem, #4b4e68, none);
    line-height: 1.35;
    text-align: center;
  }

  &__description {
    @include text(500, 1.25rem, #fff, uppercase);
    margin-top: 15px;
    margin-bottom: 30px;
  }

  &__condition-list {
    @include reset-list();
    display: flex;
    background-color: #fff;
    text-align: center;
    max-width: 1144px;
    margin-inline: auto;
  }

  &__h3 {
    text-transform: uppercase;
  }

  &__info {
    @include text(400, 1rem, #4b4e68, none);
    line-height: 1.35;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 25px;
    padding-inline: 20px;
  }

  &__name {
    @include text(600, 2.5rem, #fff, uppercase);
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
  }

  &__span {
    color: $pink;
  }

  &__container-1 {
    position: relative;
  }

  &__condition-container {
    margin-top: 90px;
  }

  &__item {
    border: 1px solid #ea377b;
    border-radius: 5px;
    margin-block: 26px;
    padding-top: 25px;
    margin-right: 32px;
  }

  &__item:first-child {
    margin-left: 30px;
    padding-top: 15px;

    h3 {
      margin-top: 0;
    }
  }

  &__item:last-child {
    padding-top: 15px;

    h3 {
      margin-top: 10px;
    }
  }

  //&__item {
  //  &:first-child {
  //    margin-left: 30px;
  //    padding-top: 15px;
  //
  //    h3 {
  //      margin-top: 0;
  //    }
  //  }
  //
  //  &:last-child {
  //    padding-top: 15px;
  //
  //    h3 {
  //      margin-top: 10px;
  //    }
  //  }
  //}

  &__h3 {
    color: $dark-purple;
    font-family: $font-family;
    margin: 0;
    margin-block: 10px;
    font-size: 1.25rem;
  }

  //&__info {
  //  margin-top: 0;
  //  margin-bottom: 0;
  //  padding-bottom: 25px;
  //  padding-inline: 20px;
  //}
}

.visually-hidden {
  position: absolute;
  @include size(1px, 1px);
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
}

.main__btn {
  @include text(600, 1.25rem, #fff);
  box-sizing: border-box;
  border-radius: 10px;
  padding: 14px;
  background-color: $pink;
  text-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
  max-width: 162px;
  border: none;
  cursor: pointer;
}

.main__btn:hover,
.category-section__link:hover,
.facilities-section__link:hover,
.product-section__link:hover,
.trending-section__link:hover,
.popular-section__link:hover {
  color: $color-gray;
  transition: 0.3s;
}

.sport-section {
  background-color: $dark-purple;
  padding-top: 187px;
  padding-inline: 40px;

  &__header {
    margin: 0 0 40px;
    @include text(600, 2rem, $color-light-gray);
    opacity: 0.3;
  }

  &__list {
    display: grid;
    grid-template-columns: 420px 420px 420px;
    grid-template-rows: 1fr 1fr;
    column-gap: 50px;
    row-gap: 40px;
    @include reset-list();
  }

  &__item {
    img {
      border-radius: 12px;
      width: 420px;
      height: 235px;
    }
  }


  a:hover {
    .sport-section__h3 {
      transition: 0.3s;
      color: $pink;
    }
  }

  &__h3 {
    margin: 0;
    padding: 16px 55px;
    background-color: rgba(75, 78, 104, 0.55);
    @include text(600, 2rem, $color-light-gray, uppercase);
    border-radius: 5px;
    @include centering();
  }

  a {
    display: inline-block;
    position: relative;
    border-radius: 12px;
  }
}

.category-section,
.facilities-section {
  background-color: $dark-purple;

  &__list {
    @include flex-container(flex, center);
    @include reset-list();
    column-gap: 50px;
  }

  &__item {
    background-color: $light-purple;
    border-radius: 5px;
    width: 300px;

    a {
      @include flex-container(flex, $align-items: center);
      flex-direction: column-reverse;
      @include size(100%, 100%);
      text-decoration: none;
      color: currentColor;
    }

    a:hover {
      .category-section__header,
      .facilities-section__header {
        color: $color-gray;
        transition: 0.3s;
      }
    }
  }

  &__header {
    margin: 0;
    padding-bottom: 20px;
    @include text(400, 1.5rem, $color-light-gray);
  }

  &__img {
    padding-top: 20px;
  }
}

.category-section,
.product-section,
.popular-section,
.trending-section,
.facilities-section {
  &__main-header {
    margin: 0;
    @include text(600, 2rem, $color-light-gray, uppercase);
  }

  &__info-container {
    @include flex-container(flex, space-between, center);
    margin-bottom: 40px;
  }

  &__link {
    @include text(400, 2rem, $color-light-gray);
    text-decoration: none;
  }
}

.product-section,
.trending-section,
.popular-section {
  background-color: $dark-purple;

  &__list {
    @include flex-container(flex, center);
    @include reset-list();
    column-gap: 44px;
  }

  &__item {
    @include flex-container(flex, $align-items: center);
    position: relative;
    flex-direction: column;
    border: 1px solid #d9d9d9;
    border-radius: 5px;
    @include size(424px, 539px);
    box-sizing: border-box;
    padding-block: 52px;
  }

  &__header {
    margin: 0;
    @include text(500, 1.5rem, $color-light-gray);
  }

  &__price {
    display: block;
    @include text(500, 1.5rem, $color-light-gray);
  }

  &__img,
  &__header,
  &__price {
    margin-bottom: 20px;
  }
}

.about-us-section,
.choose-us-section {
  background-color: $dark-purple;

  &__text,
  &__main-header {
    margin: 0;
  }

  &__text {
    @include text(400, 1.5rem, $color-gray);
    line-height: 2;
  }

  &__img {
    img {
      @include size(654px, 453px);
      border: 1px solid #000;
      border-radius: 12px;
      margin-bottom: 10px;
    }
  }

  &__main-header {
    margin-bottom: 15px;
    @include text(600, 2rem, $color-light-gray, uppercase);
  }

  &__description {
    margin-right: 25px;
  }
}

.choose-us-section {
  &__container {
    flex-direction: row-reverse;

    img {
      margin-right: 25px;
    }
  }

  &__description {
    margin-right: 0;
  }
}

.facilities-section {
  &__link {
    display: none;
  }

  &__item {
    img {
      padding-top: 25px;
      padding-bottom: 10px;
      margin-top: 0;
    }
  }

  &__header {
    margin-bottom: 0;
    padding-bottom: 25px;
  }

  &__list {
    display: flex;
    column-gap: 52px;
    @include reset-list();
  }
}

.footer {
  background-color: $light-purple;

  &__description {
    @include text(400, 1rem, #a1a1a1);
    line-height: 1.57;
    margin: 0;
  }

  &__container {
    display: flex;
  }

  &__social-list,
  &__list {
    list-style-type: none;
  }

  &__gym-logo {
    @include size(224px, 149px);
    margin-top: 40px;
    margin-bottom: 25px;
  }

  &__list,
  &__social-list,
  &__info {
    padding: 0;
    display: flex;
  }

  &__info,
  &__list {
    flex-direction: column;
  }

  &__company-list,
  &__support-list {
    margin-right: 130px;
  }

  &__social-list {
    column-gap: 14px;
  }

  &__social-link {
    display: block;
    @include size(30px, 30px);
    border-radius: 50%;
    background-color: #4b4e68;
    position: relative;

    svg {
      @include centering();
    }
  }

  &__header {
    margin-top: 40px;
    @include text(500, 1.25rem, #d9d9d9);
    line-height: 1.57;
  }

  &__company-list {
    h2 {
      margin-bottom: 26px;
    }

    ul {
      width: 150px;
    }
  }

  &__support-list {
    h2 {
      margin-bottom: 17px;
    }

    ul {
      width: 105px;
    }
  }

  &__social {
    h2 {
      margin-bottom: 10px;
    }
  }

  &__link {
    @include text(400, 1rem, #a1a1a1);
    text-decoration: none;
    line-height: 1.57;
    margin-bottom: 5px;
  }

  &__link:last-child {
    margin-bottom: 0;
  }


  &__info {
    margin-right: 130px;
  }

  &__link:hover {
    color: $color-light-gray;
    transition: 0.3s;
  }
}

.sport-section,
.footer,
.about-us-section,
.choose-us-section,
.product-section,
.trending-section,
.popular-section,
.category-section,
.facilities-section,
.sport-section {
  padding-bottom: 40px;
}


//adaptive for big screens
@media (min-width: 1600px) {
  $maxWidthContainer: 1500px;
  .sport-section,
  .category-section,
  .product-section,
  .trending-section,
  .popular-section,
  .about-us-section,
  .choose-us-section,
  .facilities-section {
    &__container {
      max-width: $maxWidthContainer;
    }
  }

  .header,
  .footer {
    &__container-1 {
      max-width: $maxWidthContainer;
    }
  }

  .header {
    &__link,
    &__sign-in,
    &__sign-up,
    &__span,
    &__link--active {
      @include text(500, 1.25rem, #fff, uppercase);
    }

    &__link--active {
      color: $pink;
    }

    &__input::placeholder {
      font-size: 1.25rem;
    }
  }
  .sport-section {
    padding-top: 210px;

    &__list {
      column-gap: 120px;
      row-gap: 60px;
    }
  }

  .category-section,
  .facilities-section {
    &__list {
      column-gap: 100px;
    }
  }
  .product-section,
  .trending-section,
  .popular-section {
    &__list {
      column-gap: 114px;
    }
  }
  .footer {
    &__company-list ul,
    &__support-list ul {
      width: 190px;
    }

    &__header {
      width: 230px;
    }

    &__description,
    &__link {
      font-size: 1.25rem;
    }

    &__header {
      font-size: 1.5rem;
    }

    &__info {
      margin-right: 90px;
    }
  }
}

// adaptive for 1250 < x < 1439
@media (max-width: 1439px) {
  $maxWidthContainer: 1200px;
  .header {
    &__input-container,
    &__input {
      width: 200px;
    }

    &__logo,
    &__nav {
      margin-right: 30px;
    }

    //&__li,
    //&__sign-in,
    //&__sign-up,
    //&__span,
    //&__link--active {
    //  @include text(500, 0.9rem, #fff, uppercase);
    //}

    &__li,
    &__sign-in,
    &__sign-up,
    &__span,
    &__link {
      @include text(500, 0.9rem, #fff, uppercase);
    }
    &__link--active {
      color: $pink;
    }
    &__input::placeholder {
      font-size: 1rem;
    }
  }
  .advantages-section {
    &__condition-container {
      max-width: $maxWidthContainer;
    }

    &__h3 {
      font-size: 1rem;
    }

    &__item {
      margin-right: 15px;
    }

    &__item:last-child {
      margin-left: 0;
      margin-right: 30px;
    }

    &__condition-list {
      max-width: 1050px;
    }

    &__info {
      font-size: 0.9rem;
    }
  }
  .sport-section {
    //&__header, &__item {
    //  text-align: center;
    //}
    &__header {
      text-align: center;
    }

    &__item {
      text-align: center;
    }

    &__list {
      // grid-template-columns: 420px 420px;
      grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 столбца, равномерно распределенные */
      grid-template-rows: 1fr 1fr 1fr;
      justify-content: center;
      column-gap: 50px;
    }

  }

  .about-us-section,
  .choose-us-section {
    &__text {
      font-size: 1.25rem;
    }
  }
  .product-section,
  .trending-section,
  .popular-section,
  .facilities-section,
  .category-section,
  .sport-section,
  .about-us-section,
  .choose-us-section {
    &__container {
      max-width: $maxWidthContainer;
    }
  }
  .sport-section__container {
    max-width: $maxWidthContainer - 250px;
  }
  .footer {
    &__container-1 {
      max-width: $maxWidthContainer;
    }
  }
}

//adaptive for 1024 < x< 1281 ...
@media (max-width: 1280px) {
  $maxWidthContainer: 950px;
  .about-us-section__container, .facilities-section__container, .choose-us-section__container, .advantages-section__condition-container, .category-section__container, .product-section__container, .popular-section__container, .trending-section__container {
    max-width: $maxWidthContainer;
  }
  .sport-section__list, .sport-section__container {
    max-width: $maxWidthContainer - 80px;
  }
  .main__btn {
    font-size: 0.9rem;
    padding: 14px;
    max-width: 130px;
  }

  .header {
    &__logo {
      @include size(75px, 50px);
    }

    &__link, &__sign-in, &__sign-up, &__span, &__link--active, input[type="search"] {
      font-size: 0.8rem;
    }

    &__circle {
      @include size(24px, 24px);

      svg {
        @include size(18px, 18px);
      }
    }

    &__input, &__input-container {
      @include size(160px, 30px);
    }

    &__input::placeholder {
      font-size: 0.9rem;
    }

    &__search-icon {
      svg {
        @include size(14px, 14px);
      }

      bottom: 4px;
    }

    &__input-container, &__nav, &__logo {
      margin-right: 20px;
    }
  }
  .advantages-section {
    background-position: center, calc(50% + 260px) center;

    &__name {
      font-size: 2rem;
    }

    &__description {
      font-size: 1rem;
    }

    &__condition-list {
      max-width: $maxWidthContainer - 200px;
    }

    &__item {
      svg {
        @include size(40px, 40px);
      }
    }

    &__condition-container, &__info {
      padding-inline: 10px;
      padding-bottom: 15px;
    }

    &__h3 {
      font-size: 0.9rem;
    }

    &__info {
      font-size: 0.8rem;
    }

    &__item {
      margin-right: 15px;
      padding-top: 15px;
      margin-block: 18px;
    }

    &__item:first-child {
      svg {
        padding-bottom: 10px;
      }

      margin-left: 20px;
    }

    &__item:last-child {
      margin-right: 20px;
    }
  }
  .sport-section {
    padding-top: 130px;

    &__header {
      font-size: 1.75rem;
    }

    &__h3 {
      font-size: 1.5rem;
    }

    &__list {
      column-gap: 40px;
    }
  }

  .category-section, .facilities-section, .product-section, .trending-section, .popular-section {
    &__main-header, &__link {
      font-size: 1.75rem;
    }

    &__header {
      font-size: 1.25rem;
    }
  }
  .category-section, .facilities-section, .product-section {
    &__price {
      font-size: 1.25rem;
    }
  }

  .about-us-section, .choose-us-section {
    &__main-header {
      font-size: 1.75rem;
    }

    &__text {
      font-size: 1rem;
    }
  }
  .footer {
    &__container-1 {
      max-width: $maxWidthContainer;
    }

    &__gym-logo {
      @include size(155px, 110px);
    }

    &__description, &__link {
      font-size: 0.9rem;
    }

    &__header {
      font-size: 1rem;
    }

    &__info, &__company-list, &__support-list {
      margin-right: 50px;
    }
  }
}

//adaptive for 768 < x < 1024
@media (max-width: 1024px) {
  $maxWidthContainer: 700px;
  .category-section, .facilities-section, .product-section, .trending-section, .popular-section {
    &__main-header {
      font-size: 1.35rem;
    }
  }
  .category-section, .facilities-section, .product-section, .trending-section, .popular-section {
    &__link {
      font-size: 1.35rem;
    }
  }
  .product-section, .trending-section, .popular-section, .category-section, .facilities-section, .about-us-section, .choose-us-section {
    &__container {
      max-width: $maxWidthContainer;
    }
  }

  .main__btn {
    max-width: 110px;
    padding: 12px;
    font-size: 0.75rem;
  }

  .header {
    &__container-1 {
      position: relative;
      width: 100%;
      justify-content: space-between;
    }

    &__nav {
      width: 100%;
      position: absolute;
      top: 60px;
    }

    &__input, &__input-container {
      width: 250px;
    }

    &__basket {
      display: inline-block;
      @include size(100%, 100%);
      padding: 0;

      svg {
        position: relative;
        top: 3px;
        left: 2px;
      }
    }

    &__favorites {
      display: inline-block;
      @include size(100%, 100%);
      padding: 0;

      svg {
        position: relative;
        top: 3px;
        left: 3px;
      }
    }
  }

  .advantages-section {
    &__container {
      margin-left: 15%;
    }
  }

  .sport-section {
    &__list {
      max-width: $maxWidthContainer - 80px;
      margin-inline: auto;
    }

    &__item {
      img {
        @include size(300px, 168px);
      }
    }

    &__item:last-child {
      h3 {
        padding-inline: 30px;
      }
    }
  }


  .category-section, .facilities-section {
    &__img {
      @include size(75px, 75px);
    }

    &__list {
      column-gap: 25px;
    }

    &__item {
      h3 {
        margin-top: 10px;
      }
    }

    &__item:last-child {
      h3 {
        padding-bottom: 18px;
      }
    }

    &__header {
      font-size: 0.85rem;
    }
  }

  .facilities-section__item:last-child h3 {
    padding-bottom: 25px;
  }

  .product-section, .trending-section, .popular-section {

    &__img {
      @include size(130px, 130px);
    }

    &__item {
      height: 100%;
    }

    &__header {
      font-size: 1rem;
    }

    &__price {
      font-size: 0.8rem;
    }
  }

  .category-section {
    &__img {
      @include size(70px, 70px);
    }
  }

  .facilities-section {
    &__img {
      @include size(55px, 55px);
    }
  }


  .about-us-section, .choose-us-section {

    img {
      @include size(320px, 222px);
    }

    &__text {
      font-size: 0.8rem;
    }

    &__main-header {
      font-size: 1.35rem;
    }
  }

  .footer {
    &__container-1 {
      max-width: $maxWidthContainer;
      position: relative;
    }

    &__gym-logo {
      @include size(100px, 73px);
    }


    &__company-list, &__info {
      margin-right: 15px;
    }

    &__social {
      position: absolute;
      transform: translateX(55%);
    }
  }
}

//adaptive for 480 < x < 768
@media (max-width: 768px) {
  $maxWidthContainer: 450px;
  .main__btn {
    padding: 8px;
    font-size: 0.6rem;
  }
  //  .product-section, .trending-section, .popular-section, .category-section {
  //    img {
  //      @include size(50px, 70px);
  //    }
  //  }
  //  .facilities-section {
  //    img {
  //      @include size(45px, 45px);
  //    }
  //  }
  .header {
    &__container-1 {
      max-width: $maxWidthContainer;
    }

    &__logo {
      @include size(60px, 40px);
      margin-right: 5px;
    }

    &__links {
      margin-right: 10px;
    }

    &__container {
      margin-left: auto;
    }

    &__input, &__input-container {
      @include size(130px, 30px)
    }

    &__input-container {
      margin-right: 10px;
    }

    &__input::placeholder {
      font-size: 0.7rem;
    }

    &__sign-in, &__sign-up, &__span {
      font-size: 0.6rem;
    }

    &__search-icon {
      @include size(13px, 13px);
    }

    &__search-icon {
      svg {
        @include size(10px, 10px);
        position: relative;
        bottom: 3px;
      }
    }

    &__search-icon {
      bottom: 8px;
    }

    &__circle {
      @include size(18px, 18px);
    }

    &__basket {
      svg {
        @include size(14px, 14px);
        top: 2px;
        left: 1px;
      }
    }

    &__favorites {
      svg {
        @include size(14px, 14px);
        top: 2px;
        left: 2px;
      }
    }


    &__burger {
      margin-left: 20px;
      @include size(18px, 18px);
      background-color: $light-purple;
      border-radius: 50%;
    }

    &__burger-link {
      display: inline-block;
      @include size(100%, 100%);
    }
  }
  .advantages-section {
    background-image: url("src/images/smoke768.png");
    background-size: 1440px 500px;
    background-position: top;
    background-repeat: no-repeat;
    padding-top: 30px;

    &__container {
      max-width: $maxWidthContainer;
      margin-inline: auto;
      text-align: center;

      button {
        margin-inline: auto;
        padding: 12px;
        font-size: 0.75rem;
      }
    }

    &__name {
      font-size: 1.5rem;
    }

    &__description {
      margin-top: 5px;
      margin-bottom: 15px;
      font-size: 0.75rem;
    }

    &__info {
      font-size: 0.7rem;
    }

    &__h3 {
      font-size: 0.7rem;
    }

    &__condition-container {
      margin-top: 50px;
      max-width: $maxWidthContainer;
    }

    &__condition-list {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      column-gap: 0;
    }
    &__item:last-child {
      margin-right: 10px;
    }
    &__item:nth-child(2) {
      margin-left: 0;
    }
    &__item {
      margin: 10px;
      svg {
        @include size(30px, 30px);
      }
    }
    &__item:first-child {
      margin-left: 10px;
    }
  }

  .sport-section {
    padding-bottom: 20px;
    padding-top: 50px;
    &__item {
      img {
        @include size(200px, 112px);
      }
    }

    &__header {
      font-size: 1.25rem;
      margin-bottom: 15px;
    }

    &__list {
      max-width: $maxWidthContainer;
      column-gap: 15px;
      row-gap: 25px;
    }

    &__h3 {
      font-size: 1rem;
      padding: 10px 25px;
    }

    &__item:last-child {
      h3 {
        padding-inline: 20px;
      }
    }
  }

  .category-section {
    &__container {
      max-width: $maxWidthContainer;
    }

    &__main-header, &__link {
      font-size: 1.25rem;
    }

    &__info-container {
      margin-bottom: 15px;
    }

    img {
      @include size(45px, 45px);
    }

    &__header {
      font-size: 0.6rem;
    }
  }
  .product-section, .trending-section, .popular-section {
    padding-bottom: 20px;

    &__container {
      max-width: $maxWidthContainer;
    }

    &__info-container {
      margin-bottom: 20px;
    }

    &__img {
      @include size(85px, 85px);
    }

    &__header {
      font-size: 0.7rem;
      margin-bottom: 10px;
    }

    &__price {
      font-size: 0.6rem;
      margin-bottom: 10px;
    }

    &__item {
      padding-block: 20px;
    }

    &__list {
      column-gap: 20px;
    }
  }
  .popular-section {
    &__item:last-child {
      h3 {
        font-size: 0.6rem;
      }
    }
  }
  .about-us-section, .choose-us-section {
    &__container {
      max-width: $maxWidthContainer;
    }

    &__text {
      font-size: 0.6rem;
    }

    &__main-header {
      font-size: 1rem;
    }

    &__img {
      margin-block: auto;
    }
  }
  .facilities-section {
    &__container {
      max-width: $maxWidthContainer;
    }

    &__img {
      @include size(35px, 35px);
    }

    &__header {
      font-size: 0.7rem;
      text-align: center;
    }

    &__item:nth-child(2) {
      img {
        padding-top: 0;
        padding-bottom: 20px;
      }
    }
  }

  .footer {
    padding-bottom: 90px;
    &__container-1 {
      max-width: $maxWidthContainer;
    }
    &__description {
      display: none;
    }
    &__social {
      top: 150px;
    }
    &__company-list {
      z-index: 5;
    }
  }
}

//adaptive for 320 < x < 480
@media (max-width: 480px) {
  $maxWidthContainer: 320px;
  .header {
    padding-inline: 15px;
    &__container-1 {
      max-width: $maxWidthContainer;
    }
    &__input, &__sign-in, &__sign-up, &__span {
      display: none;
    }
    &__input-container {

    }
    &__search-icon {
      background-color: $light-purple;
      margin-right: 0;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      top: 6px;
      left: 120px;
      svg {
        position: relative;
        left: 3px;
        top: 0;
        @include size (11px, 11px);
      }
    }
    &__burger {
      margin-left: 14px;
    }
  }
  .advantages-section {
    .main__btn {
      padding: 10px;
    }
    &__container {
      max-width: $maxWidthContainer;
    }
    &__item {
      svg {
        @include size (20px, 20px);
      }
    }
    &__name {
      font-size: 1.25rem;
    }
    &__info {
      font-size: 0.6rem;
    }
    &__condition-container {
      max-width: $maxWidthContainer;
    }
    &__condition-list {
      column-gap: 0;
      row-gap: 0;
      grid-template-columns: 1fr 1fr;
    }
    &__item:nth-child(3), &__item:nth-child(4) {
      margin-top: 0px;
    }
    &__condition-container {
      margin-top: 30px;
    }
  }
  .sport-section{
    padding-inline: 10px;
    padding-top: 20px;
    &__container {
      max-width: $maxWidthContainer;
    }
    &__header {
      font-size: 1rem;
    }
    &__item  {
      img {
        @include size(150px, 84px);
      }
    }
    &__list {
      column-gap: 5px;
    }
    &__h3 {
      padding-inline: 10px;
      font-size: 0.75rem;
    }
    &__item:last-child {
      h3 {
        padding-inline: 10px;
      }
    }
  }
  .category-section, .facilities-section {
    padding-bottom: 20px;
    &__container {
      max-width: $maxWidthContainer;
    }
    &__list {
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      row-gap: 15px;
    }
    &__item {
      width: 100%;
    }
    &__header {
      font-size: 0.8rem;
    }
    &__main-header, &__link {
      font-size: 1rem;
    }
    &__info-container {
      margin-bottom: 15px;
    }
  }
  .product-section, .trending-section, .popular-section {
    &__container {
      max-width: $maxWidthContainer;
    }
    &__list {
      flex-direction: column;
      align-items: center;
      row-gap: 15px;
    }
    &__item {
      @include size(300px, 100%);
    }
    &__main-header, &__link {
      font-size: 1rem;
    }
    &__img {
      @include size(90px, 90px);
    }
  }
  .about-us-section, .choose-us-section {
    padding-bottom: 15px;
    &__container {
      max-width: $maxWidthContainer;
      flex-direction: column-reverse;
      align-items: center;
      row-gap: 15px;
      div:first-child {
        order: 1;
      }
    }
    &__main-header, &__text {
      text-align: center;
    }
    &__text {
      font-size: 0.7rem;
    }
    &__description {
      margin-right: 0;
    }
  }
  .choose-us-section__container img {
    margin-right: 0;
  }
  .footer {
    &__container-1 {
      max-width: $maxWidthContainer;
    }
    &__gym-logo {
      @include size(80px, 50px);
      margin-top: 15px;
    }
    &__header{
      margin-top: 15px;
    }
    &__company-list {
      margin-right: 0;
      h2 {
        margin-bottom: 10px;
      }
    }
    &__link {
      font-size: 0.7rem;
    }
    &__header {
      font-size: 0.8rem;
    }
    &__social {
      top: 120px;
      left: -33px;
    }
    &__support-list, &__company-list {
      margin-right: 0;
      ul {
        width: 100%;
      }
    }
    &__company-list {
      margin-right: 15px;
    }
    &__info {
      margin-right: 0;
    }
  }
  .facilities-section {
    &__info-container {
      justify-content: center;
    }
  }
}

